package com.example.lgseckill.config;

import com.example.lgseckill.commom.rocketmq.RocketMQProducer;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@Component
public class RocketMQConfig {

    @Resource
    private RocketMQTemplate mqTemplate;

    @PostConstruct
    public void init(){
        RocketMQProducer.mqTemplate = mqTemplate;
    }
}
